home *** CD-ROM | disk | FTP | other *** search
- Right then, here's a couple of tips for all you door coders out there...
-
-
- 1) to make text output faster, call DOOR_WriteText() as little times as possible
-
- e.g. say you were writing your help for a door to the screen and you were doing
- it like this...
-
- DOOR_WriteText("This is a cool door\r\n");
- DOOR_WriteText("and here is some \r\n");
- DOOR_WriteText("rather cool help text\r\n");
- DOOR_WriteText("hope you like it!\r\n");
-
- DON'T, do it like THIS instead..
-
- DOOR_WriteText("This is a cool door\r\n"
- "and here is some \r\n"
- "rather cool help text\r\n"
- "hope you like it!\r\n");
-
- the above examples BOTH do the same thing, but the second example us better
- because a) code size is smaller b) execution time is faster and c) screen
- output is faster!
-
- 2) code routines that are called lots of times in ASM...
- (but comment well so you can convert it to PowerPC code next year! heh)
-
-
- 3) load your doors own private config files from "ProgDir:MyConfig.CFG" rather
- than specifying an absolute path like "HBBS:Doors/MyDoor/MyConfig.CFG"
-
- this makes it easier for systems to move files where they like..
-
- (you can also get the name of the directory that your program was run from
- by getting argv[0] and turning the last / into a NULL
-
- e.g. argv[0]="MyHD:hbbs/doors/mydirectory/myfile.hbbs"
- ^ change this to a 0....
-
-